
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<%@ page import="java.io.* ,java.util.*, java.sql.*, Login.*"%>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>:: Shanti Chakra Foundation ::</title>
<link href="style.css" rel="stylesheet" type="text/css">

<style type="text/css">
<!--
.style1 {color: #000000}
.style2 {color: #FFFFFF}
-->
</style>
</head>
<script>

function validate(form1)
	{
		var count = 0;
		var length = document.form1.rcheck.length ;
		for (i = 0 ; i < length ; i++)
		{ 
		if (document.form1.rcheck[i].checked == false)
			count = count + 1 ;
		
		if(count == length)
		{
			alert("Select any Record");
			document.getElementById("rcheck").focus;
			return false;
		}
	    }
	}

</script>

<body>
<p><a href = "ListMembers.jsp"> Back</a>
  <%
  String searchmem = request.getParameter("searchmem");
MySqlConnector ms = new MySqlConnector();
PreparedStatement stmt1;
ResultSet rs1 ;
ms.Connect();
// All members
String q = " SELECT memberid, name, surname, sex, mobile, email FROM registration where status = 0 and (name like '"+searchmem+"%' or memberid = '"+searchmem+"' ); " ;
 System.out.println("query in list members1"+q);
stmt1 = ms.Connect().prepareStatement(q);
System.out.println("statement is "+stmt1);
rs1 = stmt1.executeQuery();
%>
</p>

<form name="form1" method="post" action = "ManageMembers" onSubmit="return validate(this.name)">
  <table width="679" border="1" align="left"  bordercolor="#FFFFFF" class="greenlink_no_left_padding">
<tr>
<td height="33" colspan="8" bgcolor="#333333" class="style4"> 
  <div align="center">
    <pre class="boldtext style2" align="center">InActive Members List </pre>
  </div></td>
</tr>
<tr bgcolor="#333333">
<td height="28" colspan="6" class="style1"><p><span class="style5">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
<input name="auser" type="submit" class="dash-link" id="auser" style="color:#000000; font-weight:bold;" onClick="javascript:ActivateUser()" value="Activate Member">
</span><span class="style4 style2">Select the member id below and click <strong>Activate Member</strong> button</span><span class="style2">.</span></p>
</td>
</tr>
<tr>
<td class="redtext">&nbsp;</td>
<td class="redtext"><span class="style14">Member ID </span></td>
<td class="redtext">Full Name </td>
<td class="redtext">Gender</td>
<td class="redtext"><span class="style13">Mobile</span></td>
<td class="redtext"><span class="style13">Mail ID </span></td>
</tr>
<% while(rs1.next()==true)
{%>
<tr>
<td width="20"><input name="rcheck" type="radio" value="<%=rs1.getString(1)%>" id="rcheck" onChange="return validate(this.form)" ></td>
<td width="96" class="boldtext"><span class="style8"><%=rs1.getString(1)%> &nbsp;</span></td>
<td width="137" class="boldtext"><span class="style8"><%=rs1.getString(2)%> &nbsp; <%=rs1.getString(3)%> </span></td>
<td width="100" class="boldtext"><span class="style8"><%=rs1.getString(4)%></span></td>
<td width="101" class="boldtext"><span class="style8"><%=rs1.getString(5)%></span></td>
<td width="185" class="boldtext"><span class="style8"><%=rs1.getString(6)%></span></td>
</tr> <%}%>
</table>

</form>
</body>
</html>